<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>2018/12/4</title>
    <script src="http://mockjs.com/dist/mock.js"></script>
    <script src="node_modules/jquery/dist/jquery.min.js"></script>
    <!--好的代码像粥一样,是得用时间和精力熬的。-->
</head>
<body>

</body>
<script>
    Mock.mock(/\.json/,{
        'list|1-10':[{
            'id|+1':1,
            'email':'@EMAIL'
        }]
    });
    $.ajax({
      url:'hello.json',
      dataType:'json'
    }).done(function (data,status,jqXHR) {
       $('<pre>') .text(JSON.stringify(data,null,4)).appendTo('body')
    })
</script>
</html>
